package com.lovcreate.shop.mapp.controller;

import com.lovcreate.shop.api.response.DemoResponse;
import com.lovcreate.shop.api.service.DemoService;
import com.lovcreate.shop.mapp.response.BaseResponse;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author 高博
 * @version 1.0
 * @Time 2016-12-22 15:57:15
 * @Descrption demo接口
 */
@RequestMapping(value = "demo")
@RestController
public class DemoController extends AbstractMobileController {

    private final static Logger logger = org.slf4j.LoggerFactory.getLogger(DemoController.class);

    @Autowired
    DemoService demoService;

    /**
     * 创建人：gaobo
     * test
     * @return
     */
    @RequestMapping(value = "/query")
    public BaseResponse queryTest() {
        List<DemoResponse> demoResponse = demoService.queryAll();
        return success("查询成功", demoResponse);
    }


}
